home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1995 March / Macworld CD-ROM (March 1995).cdr / Demos / Microsoft Kids / MS Kids Demo / MSARTIST / 00200.ls < prev    next >
Encoding:
Text File  |  1995-02-01  |  3.1 KB  |  148 lines

  1. on startMovie
  2.   global clock, xsmall, small, medium, large, counter, EnterCounter, flag, product, projectName, viewedCW, viewedFA, projectNum, seenComic, seenPicture, seenPaper, seenCard, seenBanner, seenProject1, seenProject2, seenProject3
  3.   set clock to 60
  4.   set xsmall to 2 * clock
  5.   set small to 4 * clock
  6.   set medium to 7 * clock
  7.   set large to 9 * clock
  8.   if the machineType = 256 then
  9.     set xsmall to 3 * clock
  10.     set small to 6 * clock
  11.     set medium to 9 * clock
  12.     set large to 12 * clock
  13.   end if
  14.   set projectNum to 0
  15.   set seenSticker to 0
  16.   set seenPicture to 0
  17.   set seenPaper to 0
  18.   set seenCard to 0
  19.   set seenBanner to 0
  20.   set seenProject1 to 0
  21.   set seenProject2 to 0
  22.   set seenProject3 to 0
  23.   doTimeoutReset()
  24.   when timeOut then doContinue
  25.   set the textFont of field "talk" to "Palatino"
  26.   set the textStyle of field "talk" to "bold"
  27.   set the textSize of field "talk" to 14
  28.   set the textFont of field "talkSmall" to "Palatino"
  29.   set the textStyle of field "talkSmall" to "bold"
  30.   set the textSize of field "talkSmall" to 14
  31.   set the keyDownScript to "doKeyDown"
  32.   set EnterCounter to 0
  33. end
  34.  
  35. on doPause
  36.   global EnterCounter
  37.   doTimeoutReset()
  38.   set the timeoutLapsed to 0
  39.   set EnterCounter to 1
  40.   pause()
  41. end
  42.  
  43. on doWait a
  44.   global EnterCounter
  45.   set EnterCounter to 1
  46.   delay(a)
  47. end
  48.  
  49. on doContinue
  50.   continue()
  51. end
  52.  
  53. on doMenu
  54.   set the timeoutLength to 60 * 60
  55.   pause()
  56. end
  57.  
  58. on doTimeoutReset
  59.   set the timeoutLength to 10 * 60
  60. end
  61.  
  62. on doTimeoutLong
  63.   set the timeoutLength to 45 * 60
  64. end
  65.  
  66. on doProjects
  67.   global product, projectNum, seenComic, seenSticker, seenPicture, seenPaper, seenCard, seenBanner, seenProject1, seenProject2, seenProject3
  68.   set projectNum to seenProject1 + seenProject2 + seenProject3
  69.   if projectNum = 0 then
  70.     go("Project1")
  71.   end if
  72.   if projectNum = 1 then
  73.     go("Project2")
  74.   end if
  75.   if projectNum = 2 then
  76.     go("Project3")
  77.   end if
  78.   if projectNum = 3 then
  79.     go("Project4")
  80.   end if
  81. end
  82.  
  83. on doSound a
  84.   sound playFile 1, a & ".AIF"
  85. end
  86.  
  87. on doKeyDown
  88.   global EnterCounter
  89.   if the key = RETURN then
  90.     if EnterCounter = 1 then
  91.       set EnterCounter to 0
  92.       go(the frame + 1)
  93.     end if
  94.   end if
  95.   if the key = "p" then
  96.     go("Projects")
  97.   end if
  98.   if the commandDown and ((the key = "q") or (the key = ".") or (the key = "w")) and (the exitLock = 1) then
  99.     go("Goodbye", "MSKids")
  100.   end if
  101. end
  102.  
  103. on doClick
  104.   doSound("CLICK")
  105.   doContinue()
  106. end
  107.  
  108. on doQuit
  109.   play frame "QuitRoutine"
  110. end
  111.  
  112. on playTheme
  113.   if soundBusy(1) then
  114.   else
  115.     doSound("THEME")
  116.   end if
  117. end
  118.  
  119. on donothing
  120.   nothing()
  121. end
  122.  
  123. on grabtext
  124.   global counter
  125.   put line counter of field "sourcetext" into field "talk"
  126.   set counter to counter + 1
  127. end
  128.  
  129. on grabtextSmall
  130.   global counter
  131.   put line counter of field "sourcetext" into field "talkSmall"
  132.   set counter to counter + 1
  133. end
  134.  
  135. on addtext
  136.   global counter
  137.   set temp to the text of field "talk"
  138.   put temp & RETURN & RETURN & line counter of field "sourcetext" into field "talk"
  139.   set counter to counter + 1
  140. end
  141.  
  142. on addtextSmall
  143.   global counter
  144.   set temp to the text of field "talkSmall"
  145.   put temp & RETURN & line counter of field "sourcetext" into field "talkSmall"
  146.   set counter to counter + 1
  147. end
  148.